<link href="../SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css">
<script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script><script src="../SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
<link href="../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css">
<br>
<p class="recordOf"><strong>Programacion actual de la pagina de la radio juvenil</strong></p>
      <br>
      <form method="post" name="form1" action="?">
      <table border="2" align="center" cellpadding="5">
        <tr>
          <th>ID</th>
          <th>Dia</th>
          <th>Hora</th>
          <th>Género</th>
         <th>Acciones</th>
        </tr>
        <tr>
        <td>Añadir Nuevo</td>
        	<td><select name="diaProgra">
                    <option value="Lunes" selected>Lunes</option>
                    <option value="Martes">Martes</option>
                    <option value="Miercoles">Miercoles</option>
                    <option value="Jueves">Jueves</option>
                    <option value="Viernes">Viernes</option>
                    <option value="Sabado">Sabado</option>
                    <option value="Domingo">Domingo</option>
                  </select>
             </td>
            <td><input type="time" name="horaProgra" value="" size="32" required></td>
            <td><input name="generoProgra" type="text" required value="" size="32" maxlength="50"></td>
            <td><input type="submit" value="Añadir"><input type="hidden" name="MM_insert" value="form1"></td>
        </tr>
        <?php do { ?>
        <?php if ($totalRows_rsProgra > 0) { // Show if recordset not empty ?>
        <tr>
          <td><?php echo $row_rsProgra['prograID']; ?></td>
          <td><?php echo $row_rsProgra['diaProgra']; ?></td>
          <td><?php echo $row_rsProgra['horaProgra']; ?></td>
          <td><?php echo $row_rsProgra['generoProgra']; ?></td>
          <td align="center"><input type="hidden" value="<?php echo $row_rsProgra['prograID']; ?>" name="ID_Progra"><a href="delProgra.php?prograID=<?php echo $row_rsProgra['prograID']; ?>" onClick="return continuarSiNo()" onDblClick="return continuarSiNo()">Borrar</a><br></td>
        </tr>
        <?php } // Show if recordset not empty ?>
        <?php } while ($row_rsProgra = mysql_fetch_assoc($rsProgra)); ?>
      </table>
    </form>
    <hr width="90%">
    <p class="recordOf">Anuncios actuales</p>
  <div id="CollapsiblePanel3" class="CollapsiblePanel">
    <div class="CollapsiblePanelTab" tabindex="0">Añadir nuevo anuncio</div>
    <div class="CollapsiblePanelContent">
     <form action="?" method="POST" enctype="multipart/form-data" name="upLoadMedia" id="upLoadMedia">
  <table border="0" align="center" cellpadding="3">
    <tr valign="baseline">
      <td align="right" valign="top" nowrap>Descripción:</td>
      <td><input type="text" required name="descriptions" id="descriptions" max="20"></td>
    </tr>
    <tr valign="baseline">
      <td align="right" valign="top" nowrap>Archivo</td>
      <td><span>370*200 px</span><label for="archive"></label>
      <input name="archivo" type="file" multiple class="file" id="archivo" title="test #1" size="15" required></td>
    </tr>
    <tr valign="baseline">
      <td align="right" valign="middle" nowrap>&nbsp;</td>
      <td><input type="submit" value="Insertar registro"></td>
    </tr>
  </table>
  <input type="hidden" name="MM_insert" value="upLoadMedia">
     </form>
  </div>
</div>
<br>
<table border="2" align="center" cellpadding="5">
  <tr>
    <th>ID</th>
    <th>Imagen</th>
    <th width="100" nowrap>Nombre</th>
    <th width="150">Descripción</th>
    <th>Usuario</th>
    <th width="100">Fecha </th>
    <th width="100" align="center">Acciones</th>
  </tr>
  <?php if ($totalRows_rsAnunciosTabla > 0) { // Show if recordset not empty ?>
  <?php do { ?>
    <tr>
      <td><?php echo $row_rsAnunciosTabla['ID']; ?></td>
      <td><img src="../media/anuncios/<?php echo $row_rsAnunciosTabla['nombrearchivo']; ?>" width="80" height="80"></td>
      <td width="100" bgcolor="#FFFFFF"><?php echo $row_rsAnunciosTabla['nombrearchivo']; ?></td>
      <td width="150"><?php echo $row_rsAnunciosTabla['descriptions']; ?></td>
      <td><?php echo $row_rsAnunciosTabla['user']; ?></td>
      <td width="100"><?php echo $row_rsAnunciosTabla['date']; ?></td>
      <td width="100" align="center"><a href="delAnun.php?anunID=<?php echo $row_rsAnunciosTabla['ID']; ?>" onClick="return continuarSiNo()" onDblClick="return continuarSiNo()">Borrar</a><br></td>
    </tr>
    <?php } while ($row_rsAnunciosTabla = mysql_fetch_assoc($rsAnunciosTabla)); ?>
  <?php } // Show if recordset not empty ?>
</table>


<script type="text/javascript">
var CollapsiblePanel3 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel3", {contentIsOpen:false});
</script>
<script type="text/javascript">
function continuarSiNo(){
		return confirm("Estas a punto de borrar un registro de forma permanente, ¿Deseas continuar?")}
</script>